#ifndef _EARBUD_WQ_COMM_H_
#define _EARBUD_WQ_COMM_H_


typedef enum {
    STAGE_IDLE,
    STAGE_HIGH_100MS,
    STAGE_OPCODE_START,
    STAGE_OPCODE,
    STAGE_OPCODE_STOP,
    STAGE_PARAM_START,
    STAGE_PARAM,
    STAGE_PARAM_STOP,
    STAGE_END,
} stage_t;

#define BOX_MSG_OPT_CODE_BOX_OPEN   0x50
#define BOX_MSG_OPT_CODE_BOX_CLOSE  0x51
#define BOX_MSG_OPT_CODE_LONG_3S    0x52
#define BOX_MSG_OPT_CODE_LONG_10S   0x53
#define BOX_MSG_OPT_CODE_RECONFIG   0x54
#define BOX_MSG_OPT_CODE_ENTER_DUT  0x55
#define BOX_MSG_OPT_CODE_ENTER_OTA  0x56
#define BOX_MSG_OPT_CODE_ENTER_PAIR 0x57
#define BOX_MSG_OPT_CODE_SHUT_DOWN  0x58
#define BOX_MSG_OPT_CODE_LONG_20S   0x59



void earbud_wq_comm_tim_callback(void);

void earbud_wq_comm_start(void);
void earbud_wq_comm_stop(void);

void earbud_comm_send_cmd(uint8_t role, uint8_t cmd);

uint8_t earbud_wq_comm_is_en(void);

void earbud_wq_comm_init(void);
void earbud_wq_comm_deinit(void);


#endif
